
package com.htd.htdapmcommon.enums;

public enum AlarmSendStatus {


	SEND_YES("SEND_YES","已发送告警"),
    SEND_NO("SEND_NO","未发送告警");


	private String code;

	private String msg;

	private AlarmSendStatus(String code, String msg){
		this.code = code;
		this.msg = msg;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

    /**
     * 根据code获取去value
     * @param code
     * @return
     */
    public static String getValueByCode(String code){
        for(AlarmSendStatus alarmSendStatus:AlarmSendStatus.values()){
            if(code.equals(alarmSendStatus.getCode())) {
                return alarmSendStatus.getMsg();
            }
        } return null;
    }
}
